// eslint-disable-next-line no-unused-vars
// eslint-disable-next-line standard/object-curly-even-spacing
import {get, post, deletes, put } from './axios.js'
// const http = 'http://zlad.zgweiqu.com/v3'
const http = '/api'
const myregMobile = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9]|16[0-9])[0-9]{8}$/
const getCode = (parmas) => {
    return get(`${http}/common/rsaEncrypt`, { sign: parmas })
}
const webLogin = (params) => {
    // eslint-disable-next-line no-undef
    return post(`${http}/advertiser/login`, params)
}
const getProportion = (params) => {
        return get(`${http}/index/proportion`, params)
    }
    /**
     * @param {
     *advertiser_id = 广告主编号
     *type = 查看的类型(1为今日,2为昨日,3为本周,4为本月)} params
     */
const getDiagram = (params) => {
    return get(`${http}/index/diagram`, params)
}
const getMachine = (params) => {
    return get(`${http}/advertiser/machine`, params)
}
const getAdplate = (params) => {
    return get(`${http}/advertiser/adplate`, params)
}
const getAdList = (params) => {
    return get(`${http}/advertiser/list`, params)
}
const upAD = (params) => {
    return get(`${http}/advertiser/upload`, params)
}
const getQNToken = (params) => {
    return get(`${http}/common/token`, params)
}
const getMachineList = (params) => {
    return get(`${http}/advertiser/listmachine`, params)
}
const putAdvertiser = (params) => {
    return get(`${http}/advertiser/put`, params)
}
const getDateDiagram = (params) => {
    return get(`${http}/advertiser/datediagram`, params)
}
const getDateHistogram = (params) => {
    return get(`${http}/advertiser/datehistogram`, params)
}
const getPlaytimes = (params) => {
    return get(`${http}/advertiser/playtimes`, params)
}
const getPlateMachine = (params) => {
    return get(`${http}/advertiser/platemachine`, params)
}
const outPlateMachine = (params) => {
    return get(`${http}/advertiser/out`, params)
}
const deleteADTtemplate = (params) => {
    return get(`${http}/advertiser/deleteplate`, params)
}
const examineList = (params) => {
    return get(`${http}/advertiser/examine`, params)
}
export default {
    post,
    webLogin,
    getProportion,
    myregMobile,
    getCode,
    getMachine,
    getAdplate,
    getAdList,
    upAD,
    getDiagram,
    getQNToken,
    getMachineList,
    putAdvertiser,
    getDateDiagram,
    getDateHistogram,
    getPlaytimes,
    getPlateMachine,
    outPlateMachine,
    deleteADTtemplate,
    examineList
}